import Vue from 'vue';
import VueRouter from 'vue-router';

Vue.use(VueRouter);

const routes = [
    {
        path: '/',
        redirect: { path: '/login' }
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('../views/login')
    },
    {
        path: '/register',
        name: 'register',
        component: () => import('../views/register')
    },
    {
        path: '/index',
        name: 'index',
        component: () => import('../views/index'),
        children: [{
            path: '/efeManagement',
            name: 'efeManagement',
            component: () => import('../views/dataAcquisition/efeManagement')
        }, {
            path: '/feMeasurement',
            name: 'feMeasurement',
            component: () => import('../views/dataAcquisition/feMeasurement')
        }
        ]
    }
];

const router = new VueRouter({
    routes
});

export default router;
